package selef.xiafan.service;

import selef.xiafan.entity.system.SysPermission;
import selef.xiafan.entity.user.User;
import selef.xiafan.query.SysPermissionQ;
import selef.xiafan.util.result.PageResult;

import java.util.List;
import java.util.Set;

/**
 * @author xiafan
 * @version 1.0
 * @date 2021/7/1 23:13
 */
public interface ISysPermissionService {
    List<SysPermission> list();
    Set<String> listPermissionURLsByUser(String name);
    boolean needFilter(String requestAPI);
    Set<String> findUrlByUserid(User user);

    List<SysPermission> getAll();

    List<SysPermission> findAllById(Integer id);

    List<SysPermission> getMenusByCurrentUser();

    PageResult<SysPermission> listPermission(SysPermissionQ sysPermissionQ);

    List<SysPermission> getAllByParentId(Integer parentId);

    List<SysPermission> getMenuList(Integer roldId);

    int addOrUpdate(SysPermission sysPermission);

    int delete(SysPermission sysPermission);
}
